package com.lgrousset.loanssimulator.client.chart.widget;

import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.lgrousset.loanssimulator.client.EventBus;
import com.lgrousset.loanssimulator.client.chart.event.LoanAmountChangedEvent;

public class LoanFieldAmount extends LoanField {

	public LoanFieldAmount() {
		super();
		
		setLabel("Capital :");
		addChangeHandler(new ChangeHandler() {
			@Override
			public void onChange(ChangeEvent event) {
				LoanAmountChangedEvent customEvent = new LoanAmountChangedEvent();                                        
                EventBus.get().fireEvent(customEvent);
			}
		});
	}
}
